package ch.be.coop.unterhaltLaden;

import ch.be.coop.unterhaltLaden.busines.CoopStore;
import ch.be.coop.unterhaltLaden.busines.Engine;

public class CoopUnterhaltLadenConsoleTester {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		Engine engine = new Engine();
		
		System.out.println("CoopDatabasefile exists: "+engine.serchDatabase());
		
		System.out.println("can read list: "+ engine.readDatabase());
		
		System.out.println("Coop nr. 2: "+engine.getCoopList().get(2));
		
		System.out.println("rewrite Database: " + engine.reWriteDatabase());
		
		System.out.println("new Coop added: " + engine.addNewCoopInList(new CoopStore()));
		
		System.out.println("Newest Coop: "+engine.getCoopList().get(engine.getCoopList().size()-1));

	}

	/*
	 * JFileChooser d = new JFileChooser();
    d.setFileFilter( new FileFilter()
    {
      @Override
      public boolean accept( File f )
      {
        return f.isDirectory() || f.getName().toLowerCase().endsWith( ".jpg" )
            || f.getName().toLowerCase().endsWith( ".gif" );
      }
      @Override
      public String getDescription()
      {
        return "*.jpg;*.gif";
      }
    } );
    d.showOpenDialog( null );
    File file = d.getSelectedFile();
    viewComponent.setImage( file );
  }
  
  
  
  
  
    Icon _icon = new ImageIcon("bild.gif");
   JLabel _label = new JLabel(_icon);
   
   
   
	 */
}
